package com.mlingdu.supercloudreader.app;

import android.app.Application;
import android.content.res.Configuration;
import android.content.res.Resources;

import com.example.http.HttpUtils;
import com.mlingdu.supercloudreader.utils.DebugUtil;

/**
 * 项目名：SuperCloudReader
 * 包名：com.mlingdu.supercloudreader.app
 * Created by daimaren on 2017/6/23.
 */

public class CloudReaderApplication extends Application {

	private static CloudReaderApplication cloudReaderApplication;

	public static CloudReaderApplication getInstance() {
		return cloudReaderApplication;
	}

	@SuppressWarnings("unused")
	@Override
	public void onCreate() {
		super.onCreate();
		cloudReaderApplication = this;
		HttpUtils.getInstance().init(this, DebugUtil.DEBUG);

		initTextSize();
	}

	/**
	 * 使其系统更改字体大小无效
	 */
	private void initTextSize() {
		Resources res = getResources();
		Configuration config = new Configuration();
		config.setToDefaults();
		res.updateConfiguration(config, res.getDisplayMetrics());
	}

}

